package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 检测结果数据对象 detection_result
 * 
 * @author ruoyi
 * @date 2025-10-22
 */
public class DetectionResult extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 结果ID（主键） */
    private Long resultId;

    /** 关联任务ID */
    @Excel(name = "关联任务ID")
    private Long taskId;

    /** 关联检测项ID */
    @Excel(name = "关联检测项ID")
    private Long itemId;

    /** 实测值 */
    @Excel(name = "实测值")
    private BigDecimal actualValue;

    /** 与标准值的偏差 */
    @Excel(name = "与标准值的偏差")
    private BigDecimal deviation;

    /** 是否合格（1-合格，0-不合格，NULL-无标准） */
    @Excel(name = "是否合格", readConverterExp = "1=-合格，0-不合格，NULL-无标准")
    private Long isQualified;

    /** 检测时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "检测时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date detectionTime;

    /** 检测仪器 */
    @Excel(name = "检测仪器")
    private String instrument;

    /** 检测员ID */
    @Excel(name = "检测员ID")
    private Long operatorId;

    public void setResultId(Long resultId) 
    {
        this.resultId = resultId;
    }

    public Long getResultId() 
    {
        return resultId;
    }

    public void setTaskId(Long taskId) 
    {
        this.taskId = taskId;
    }

    public Long getTaskId() 
    {
        return taskId;
    }

    public void setItemId(Long itemId) 
    {
        this.itemId = itemId;
    }

    public Long getItemId() 
    {
        return itemId;
    }

    public void setActualValue(BigDecimal actualValue) 
    {
        this.actualValue = actualValue;
    }

    public BigDecimal getActualValue() 
    {
        return actualValue;
    }

    public void setDeviation(BigDecimal deviation) 
    {
        this.deviation = deviation;
    }

    public BigDecimal getDeviation() 
    {
        return deviation;
    }

    public void setIsQualified(Long isQualified) 
    {
        this.isQualified = isQualified;
    }

    public Long getIsQualified() 
    {
        return isQualified;
    }

    public void setDetectionTime(Date detectionTime) 
    {
        this.detectionTime = detectionTime;
    }

    public Date getDetectionTime() 
    {
        return detectionTime;
    }

    public void setInstrument(String instrument) 
    {
        this.instrument = instrument;
    }

    public String getInstrument() 
    {
        return instrument;
    }

    public void setOperatorId(Long operatorId) 
    {
        this.operatorId = operatorId;
    }

    public Long getOperatorId() 
    {
        return operatorId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("resultId", getResultId())
            .append("taskId", getTaskId())
            .append("itemId", getItemId())
            .append("actualValue", getActualValue())
            .append("deviation", getDeviation())
            .append("isQualified", getIsQualified())
            .append("detectionTime", getDetectionTime())
            .append("instrument", getInstrument())
            .append("operatorId", getOperatorId())
            .append("remark", getRemark())
            .toString();
    }
}
